#pragma once
#include "EpilFunctionObject.h"


typedef EpilObjectVector (*EpilNativeFunction)( EpilInterpreter * interpreter, const EpilObjectVector & params );


class EpilNativeFunctionObject : public EpilFunctionObject
{
public:
	EpilNativeFunctionObject( EpilInterpreter * interpreter );
	virtual ~EpilNativeFunctionObject();

	EpilNativeFunction					GetFunction() const								{ return m_function; }
	void								SetFunction( EpilNativeFunction function )		{ m_function = function; }

	bool								operator==( EpilNativeFunction rhs ) const;
	bool								operator==( const EpilObject & rhs ) const;

	virtual EpilFunctionType			GetFunctionType() const							{ return EFT_Native; }

	virtual tstring						ToString() const;
	virtual EpilObjectVector			Invoke( const EpilObjectVector & params ) const;

private:
	EpilNativeFunction					m_function;
};